extends layout

block content
	h1= title
	p Welcome to #{title}
	ul#messageList
	script(src="/javascripts/socket.io.min.js")
	script(src="/javascripts/jquery-3.1.1.min.js")
	script.
		var socket = io.connect('ws://localhost:6100');
		socket.on('news', function (data) {
			console.log(data);
			var $message = $("<li>",{text:data.hello});
			$("#messageList").append($message);
			console.log($message)
			//- socket.emit('my other event', { my: 'data' });
		});
